package com.xuecheng.content.convert;

import com.xuecheng.api.content.model.dto.CourseTeacherDTO;
import com.xuecheng.api.content.model.vo.CourseTeacherVO;
import com.xuecheng.content.entity.CourseTeacher;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface CourseTeacherConvert {

    CourseTeacherConvert INSTANCE = Mappers.getMapper(CourseTeacherConvert.class);

    // 将vo转为dto数据
   // @Mapping(source = "courseTeacherId",target = "id")
    CourseTeacherDTO vo2dto(CourseTeacherVO courseTeacherVO);

    // 将dto转为po数据
    @Mapping(source = "courseTeacherId",target = "id")
    CourseTeacher dto2po(CourseTeacherDTO courseTeacherDTO);

//    // 将po转为dto数据
    @Mapping(source = "id",target = "courseTeacherId")
    CourseTeacherDTO PO_DTO(CourseTeacher courseTeacher);

    // 将entity转为dto数据
    @Mapping(source = "id",target = "courseTeacherId")
    CourseTeacherDTO entity2dto(CourseTeacher courseTeacher);

 // List<CourseTeacherDTO> entitys2dto(List<CourseTeacher> courseTeacher);


}